package com.fk.util;

import java.util.Calendar;
import java.util.Date;

public class DateTimeUtil {

	/**
	 * 计算date之前n天的日期
	 */
	public static Date getDateBefore(Date date, int n) {
		Calendar now = Calendar.getInstance();  
        now.setTime(date);  
        now.set(Calendar.DATE, now.get(Calendar.DATE) - n);  
        return now.getTime();
	}


}
